﻿@using CodeCamp.Models.Schedule
@using CodeCamp.Models.Shared
@using CodeCamp.Infrastructure.Extensions
@model ScheduleGridViewModel
@{
    Layout = "~/Views/Shared/_LayoutWideSimple.cshtml";
    ViewBag.Title = "";
    string headline;
    if ((@Model != null) && (@Model.EventDisplayName != null))
    {
        ViewBag.Title = @Html.Encode(@Model.EventDisplayName + " | Session Grid");
        headline = @Model.EventDisplayName + " Session Grid";
    }
    else
    {
        ViewBag.Title = "Code Camp | Session Grid";
        headline = "Code Camp Session Grid";
    }
}
@section headaddon {
<style>
    table.sessionGrid
    {
        border-collapse: collapse;
        border: solid 1px;
        margin: 0;
        margin-left:10px;
        margin-right:10px;
    }
</style>
}

@if (Model.ScheduleIsPublic)
{
<h2>@headline</h2>
}
else
{
<h2>@headline - Schedule not yet public</h2>
}

@if (User.IsInRole(CCRoles.RoleNames.BigCheeze))
{
<h4>@Html.ActionLink("Unscheduled Sessions", "UnscheduledSessions", "Sessions", new { eventName=Model.EventShortName}, null)</h4>
}
   
@if (Model.ScheduleGrid != null)
{ 
    @Html.Partial("Partial/ScheduleGrid", Model.ScheduleGrid)
}
